package com.drcoffee.drcoffeemall.mapper;


import com.drcoffee.drcoffeemall.entry.AttachmentPriceSingle;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface AttachmentSingleMapper {
    //根据料号查询是否有数据
    @Select("select count(*) from t_attachment_price_single where part_code = #{part_code}")
    int findByMaterialCode(String materialCode);

    //根据料号查询该条数据价格单位
    @Select("select * from t_attachment_price_single where part_code = #{part_code}")
    AttachmentPriceSingle findPriceUnitByCode(String code);

}
